﻿namespace TC
{
    public class GetString : VariableNode
    {
        public ValueInput<string> keyIn;
        public ValueOutput<string> valueOut;

        public override void OnCreate()
        {
            base.OnCreate();

            keyIn = this.AddValueInPort<string>("keyIn");
            valueOut = this.AddValueOutPort<string>("valueOut",
                () =>
                {
                    return graph.context.Get<string>(keyIn.Value);
                });
        }
    }
}
